package com.example.qixinshangwutong.presenter;


import com.example.qixinshangwutong.model.brand.SortRequest;
import com.example.qixinshangwutong.model.brand.SortValues;
import com.example.qixinshangwutong.model.home.HomeBrandRequest;
import com.example.qixinshangwutong.model.home.HomeBrandValues;
import com.example.qixinshangwutong.model.home.HomeNewsRequest;
import com.example.qixinshangwutong.model.home.HomeNewsValues;
import com.example.qixinshangwutong.model.home.HotWorldRequest;
import com.example.qixinshangwutong.model.home.HotWorldValue;
import com.example.qixinshangwutong.model.home.SearchData;
import com.example.qixinshangwutong.model.home.SearchRequest;
import com.example.qixinshangwutong.model.news.Responese;
import com.example.qixinshangwutong.model.news.values;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

public interface API {
    //品牌查询
    @GET("/index/brand?")
    Call<SortRequest<SortValues>>  getSortData(@Query("sort") String sort,
                                               @Query("ssdq_code")int ssdq_code,
                                               @Query("hylb_code")int hylb_code,
                                               @Query("page")int page);
    //首页热词
    @GET("/index/huanyihuan")
    Call<HotWorldRequest<HotWorldValue>> getHotWorldData(@Query("client" )String client);
    //首页品牌
    @GET("/index/index-brand")
    Call<HomeBrandRequest<HomeBrandValues>> getHomeBrand();
    //首页新闻
    @GET("/index/index")
    Call<HomeNewsRequest<HomeNewsValues>> getHomeNews();
    //搜索
    @GET("/index/search")
    Call<SearchRequest<SearchData>> getSearch(@Query("key")String key);

    @GET("/index/news-hot")
    Observable<Responese<values>> requestWeather();

    @GET("/index/news")
    Observable<Responese<values>> thridlist(@Query("page") int page);



}
